<div class="breadcrumbs" id="breadcrumbs">
	<script type="text/javascript">
		try {
			ace.settings.check('breadcrumbs', 'fixed')
		} catch (e) {
		}
	</script>

	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
		<li><a href="#">运营数据</a></li>
		<li class="active">留存数据查询</li>
	</ul>
</div>
<div class="page-content">
	<div class="page-header">
		<h1>留存数据列表</h1>
	</div><!-- end /.page-header -->
	
	<div class="row">
		<div class="col-xs-14">
			<table id="grid-table"></table>
			<div id="grid-pager"></div>
		</div><!-- end /.col -->
	</div><!-- end /.row -->
</div><!-- end /.page-content -->

<script type="text/javascript">
	jQuery(function($){
		datePick = function(elem){
			jQuery(elem).datepicker({
				format:'yyyymmdd',
				language: "zh-CN",
				autoclose:true
				});
		}
		
		var grid_selector = "#grid-table";
		var pager_selector = "#grid-pager";
		jQuery(grid_selector).jqGrid({
			url : '${basePath}/regAct/list',
			datatype: 'json',
			mytype : 'POST',
			height: 400,
			colNames:['编号','日期','渠道','渠道','产品','产品','国家','国家','用户数','次日留存','2日留存','3日留存','4日留存','5日留存','6日留存','7日留存'],
			colModel:[
			          {name:'id',index:'id',hidden:true,width:1,sorttype:"int",editable:false,search:false},
			          {name:'separatorDate',index:'separatorDate',width:20,editable:false,
			        	  search:true,stype:"text",searchoptions:{dataInit:datePick,attr:{title:'选择日期'}},searchrules:{required:true,integer:true}},
			          {name:'channelId',index:'channelId',hidden:true,sortable:false,width:1,editable:false,
			        	  search:true,stype:"select", searchoptions:{value:'${channelKeyValues}',searchhidden:true},
			        	  viewable:false},
			          {name:'channelName',index:'channelName',sortable:false,editable:false,search:false,width:30},
			          {name:'productId',index:'productId',hidden:true,sortable:false,width:1,editable:false,
		        		  search:true,stype:"select", searchoptions:{value:'${productKeyValues}',searchhidden:true},
		        	  viewable:false},
		         	  {name:'productName',index:'productName',sortable:false,editable:false,search:false,width:30},
			          {name:'countryId',index:'countryId',hidden:true,sortable:false,width:1,editable:false,
			        	  search:true,stype:"select",searchoptions:{value:'${countryKeyValues}',searchhidden:true},
			        	  viewable:false},
			          {name:'countryName',index:'countryName',editable:false,sortable:false,width:30,search:false},
			          {name:'currentCouns',index:'currentCouns',sorttype:"int",sortable:'true',editable:false,width:15},
			          {name:'firstActive',index:'firstActive',sorttype:"int",sortable:'true',editable:false,width:15},
			          {name:'secondActive',index:'secondActive',sortable:'true',editable:false,width:15},
			          {name:'thirdActive',index:'thirdActive',sortable:'true',editable:false,width:15},
			          {name:'forthActive',index:'forthActive',sortable:'true',editable:false,width:15},
			          {name:'fifthActive',index:'fifthActive',sortable:'true',editable:false,width:15},
			          {name:'sixthActive',index:'sixthActive',sortable:'true',editable:false,width:15},
			          {name:'seventhActive',index:'seventhActive',sortable:'true',editable:false,width:15}
			          ],
			         	jsonReader:{repeatitems:false},
			          	viewrecords : true,
						rowNum:10,
						rowList:[10,20,30,50,100,1000],
						pager : pager_selector,
						altRows: true,
						loadtext:'正在加载数据...',
						multiselect: true,
				        multiboxonly: true,
				        loadComplete:function(){
				        	var table = this;
				        	setTimeout(function(){
								updatePagerIcons(table);
								enableTooltips(table);
				        	},0);
				        },
				        caption:"留存数据列表",
				        autowidth:true
		});
		//引入jqgrid通用js 脚本
		<#include "/WEB-INF/common/_jqGrid2.html"/>
	});
</script>